home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr46
/
be310.zip
/
STRIP.CHS
< prev
next >
Wrap
Text File
|
1993-06-01
|
1KB
|
35 lines
/* CHESS FUNCTION(S): STRIP.CHS -- standalone program
/* DATE: 3/1/93
/* AUTHOR: C. Schanck
/*
/* DESCRIPTION: This program strips comments out of a Chess program
/* file. It uses the regular expression search algorithm to find '/*' strings
/* which are not in strings.
{
char com_target[40]; /* search target
int i;
set_display(0); /* turn the display update off
Top_of_file(); /* all the way to the top
Begin_line();
/* now search for a '/*' string with no enclosing "
sformat(com_target,"search ~////[*][/~%c]*~ ~r~",34);
while((i=Cmd_line(com_target))) /* while you find them...
{
Del_eol(); /* del to eol
}
Top_of_file(); /* all the way to the top of the file...
Begin_line();
while(Search("~^$~ ~r~")) /* search for each blank line...
{
Del_line(); /* delete the line
}
set_display(1); /* turn the display back on
update_display(); /* update the display
return(1); /* return success
}